<template>
  <div class="exception-page">
    <div class="exception-content">
      <h1>404</h1>
      <div class="exception-desc">抱歉，您访问的页面不存在</div>
      <div class="exception-action">
        <el-button type="primary" @click="backHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

function backHome() {
  router.push('/');
}
</script>

<style scoped>
.exception-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.exception-content {
  text-align: center;
}

.exception-content h1 {
  font-size: 120px;
  font-weight: bold;
  color: #409eff;
  margin-bottom: 16px;
}

.exception-desc {
  font-size: 18px;
  color: #666;
  margin-bottom: 24px;
}

.exception-action {
  margin-top: 20px;
}
</style>
